package gui;

import java.awt.Color;
import java.awt.Font;
import java.awt.event.ActionListener;
import java.awt.image.BufferedImage;
import java.awt.Image;
import java.io.File;
import java.io.IOException;
import java.net.URL;

import javax.imageio.ImageIO;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import javax.swing.border.EmptyBorder;
import javax.swing.Icon;

public class Usermenu extends JPanel {

	private JLabel lblUserMenu;
	private JButton btnShowBalance;
	private JButton btnDeposit;
	private JButton btnTransfer;
	private JButton btnWithdraw;
	private JButton btnLogOut;
	private ImageIcon cbslogo;
	private JLabel piclabel;

	/**
	 * Create the panel.
	 * 
	 * @throws IOException
	 */
	public Usermenu() {
		setBackground(Color.WHITE);
		setLayout(null);

		lblUserMenu = new JLabel("User menu");
		lblUserMenu.setFont(new Font("Tahoma", Font.BOLD, 14));
		lblUserMenu.setBounds(187, 33, 74, 17);
		add(lblUserMenu);

		btnShowBalance = new JButton("Show balance");
		btnShowBalance.setBounds(54, 78, 116, 23);
		add(btnShowBalance);

		btnDeposit = new JButton("Deposit");
		btnDeposit.setBounds(54, 112, 116, 23);
		add(btnDeposit);

		btnWithdraw = new JButton("Withdraw");
		btnWithdraw.setBounds(54, 146, 116, 23);
		add(btnWithdraw);

		btnTransfer = new JButton("Transfer");
		btnTransfer.setBounds(54, 180, 116, 23);
		add(btnTransfer);

		btnLogOut = new JButton("Log out");
		btnLogOut.setBounds(153, 214, 108, 23);
		add(btnLogOut);

		piclabel = new JLabel("");
		piclabel.setBounds(239, 78, 116, 105);
		add(piclabel);

		Image cbslogo = new ImageIcon(this.getClass().getResource(
				"BCBS_logo.png")).getImage();
		piclabel.setIcon(new ImageIcon(cbslogo));

	}

	public void addActionListener(ActionListener l) {
		btnShowBalance.addActionListener(l);
		btnDeposit.addActionListener(l);
		btnWithdraw.addActionListener(l);
		btnTransfer.addActionListener(l);
		btnLogOut.addActionListener(l);

	}

	public JLabel getLblUserMenu() {
		return lblUserMenu;
	}

	public JButton getBtnShowBalance() {
		return btnShowBalance;
	}

	public JButton getBtnDeposit() {
		return btnDeposit;
	}

	public JButton getBtnTransfer() {
		return btnTransfer;
	}

	public JButton getBtnWithdraw() {
		return btnWithdraw;
	}

	public JButton getBtnLogOut() {
		return btnLogOut;
	}

	public ImageIcon getCbslogo() {
		return cbslogo;
	}
}
